package com.itheima.api.map.demo03;

import java.util.HashMap;
import java.util.Map;

public class MapGetDemo {

    public static void main(String[] args) {

        Map<String, String> map = new HashMap<>();
        map.put("蓝湛", "蓝忘机");
        map.put("魏婴", "魏无羡");
        map.put("蓝涣", "蓝曦臣");
        System.out.println(map);

//        String remove = map.remove("蓝湛");
//        System.out.println(remove);
//        System.out.println(map.remove("魏婴"));
//        System.out.println(map);

//        map.clear();
//        System.out.println(map);

//        boolean 蓝湛 = map.containsKey("蓝湛");
        System.out.println(map.containsKey("蓝湛"));
        System.out.println(map.containsKey("蓝愿"));

        System.out.println(map.containsValue("蓝忘机"));
        System.out.println(map.containsValue("蓝思追"));

        System.out.println(map.isEmpty());
        System.out.println(map.size());

    }
}
